home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / libs / svgabg55 / svgautil.h < prev    next >
C/C++ Source or Header  |  1994-06-10  |  1KB  |  65 lines

  1. /************************************************/
  2. /*                         */
  3. /*     BGI common defines/utility functions    */
  4. /*        Copyright (c) 1994        */
  5. /*        Jordan Hargraphix Software        */
  6. /*                        */
  7. /************************************************/
  8. #ifndef __SVGAUTIL_H__
  9. #define __SVGAUTIL_H__
  10.  
  11. typedef unsigned char DacPalette16[16][3];
  12. typedef unsigned char DacPalette256[256][3];
  13.  
  14. #define    XNOR_PUT    5
  15. #define NOR_PUT        6
  16. #define NAND_PUT    7
  17. #define TRANS_COPY_PUT    8    /* Doesn't work with 16-color drivers */
  18.  
  19. #pragma pack(1)
  20. typedef struct __bpp24 {
  21.   unsigned char bVal;
  22.   unsigned char gVal;
  23.   unsigned char rVal;
  24. } __bpp24;
  25.  
  26. typedef struct __bpp16 {
  27.   unsigned int bVal : 5;
  28.   unsigned int gVal : 6;
  29.   unsigned int rVal : 5;
  30. } __bpp16;
  31.  
  32. typedef struct __bpp15 {
  33.   unsigned int bVal : 5;
  34.   unsigned int gVal : 5;
  35.   unsigned int rVal : 5;
  36. } __bpp15;
  37.  
  38. typedef union {
  39.   struct __bpp24 c24;
  40.   struct __bpp16 c16;
  41.   struct __bpp15 c15;
  42.   unsigned long  cval;
  43. } __rColor;
  44. #pragma pack()
  45.  
  46. #ifdef __cplusplus
  47. extern "C" {
  48. #endif
  49.  
  50. /* Define enhanced color setting functions */
  51. long RGB(char,char,char);
  52. long RealDrawColor(long);
  53. long RealFillColor(long);
  54. long RealColor(long);
  55.  
  56. /* Define palette functions */
  57. void getvgapalette16(DacPalette16 *);
  58. void getvgapalette256(DacPalette256 *);
  59.  
  60. #ifdef __cplusplus
  61. };
  62. #endif
  63.  
  64. #endif /* __SVGAUTIL_H__ */
  65.